home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / tutorials / geometer / geomgizmo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.9 KB  |  110 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17.  
  18. /* defines for gizmos */
  19.  
  20. #define BUTSTRLEN    200
  21. #define LABELSTRLEN    50
  22.  
  23. #define FONTWIDTH    9    /* for font 0 */
  24. #define BASELINE    9
  25.  
  26. /* BUTTON STUFF */
  27. #define PUSHBUTTON    3
  28. #define INDICATOR    9
  29. #define BED        10
  30. #define BUTTON        11
  31.  
  32. #define BUTHEIGHT    28
  33. #define BUTWIDTH    75
  34.  
  35. typedef struct {
  36.     long xmin,xmax,ymin,ymax;
  37.     char str[BUTSTRLEN+1];
  38.     long active;
  39.     long enable;
  40.     long locate;
  41.     long select;
  42.     long type;
  43. } Button;
  44.  
  45.  
  46. /* TEXT BOX STUFF */
  47. #define TBSTRLEN     200 
  48. #define TEXTHEIGHT    20
  49. #define TEXTBOXHEIGHT   28
  50.  
  51. typedef struct {
  52.     long    xmin, xmax, ymin;
  53.     char    str[TBSTRLEN+1];
  54.     char    label[LABELSTRLEN+1];
  55.     long    tp1, tp2;
  56.     long    charWidth;
  57.     long    active;
  58.     long    enable;
  59.     long    type;
  60. } TextBox;
  61.  
  62. TextBox *newtb();
  63.  
  64. /* TEXT LIST STUFF */
  65. typedef struct {
  66.     long        xmin, xmax, ymin;
  67.     long        listheight;     /* in lines of text */
  68.     char        **strs;
  69.     long        top;    /* index into strs */
  70.     long        count;  /* total number of strings */
  71.     long        selecteditem;
  72. } TextList;
  73.  
  74. TextList *newtl();
  75.  
  76. /* Define for the settbtype() and gettypein() flag */
  77. #define TYPEIN_STRING    0
  78. #define TYPEIN_INT    1
  79. #define TYPEIN_FILE    2
  80. #define TYPEIN_FLOAT    3
  81.  
  82. /* Color Stuff */
  83.  
  84. void    Black(), White(), TerraCotta(), DkTerraCotta(),
  85.         VyDkGray(), DkGray(), MmGray(), LtGray(), VyLtGray(),
  86.         LtYellow(), Yellow(), MmYellow(), DkYellow(),
  87.     Red(), Background();
  88.  
  89. Button *newbed(long, long, long, long);
  90. Button *newbut(long, long, long, long);
  91. void drawbut(Button *);
  92. extern long getcurrentcolor();
  93. void setcurrentcolor(long c);
  94. extern void drawedges(long, long, long, long, void (*)(), void (*)());
  95. extern void loadbut(Button *,  char *);
  96. extern void drawbut(Button *);
  97. extern long pressbut(Button *);
  98. extern TextBox  *newtb(long, long, long);
  99. extern void loadtb(TextBox *, char *);
  100. extern long handletb(TextBox *, long, long);
  101. extern void drawtb(TextBox *);
  102. extern long inbut(Button *, long, long);
  103. extern long intb(TextBox *, long, long);
  104. extern void activatetb(TextBox *);
  105. extern void deactivatetb(TextBox *);
  106. extern void freebut(Button *);
  107. extern void freetb(TextBox *);
  108. extern char *gettbstr(TextBox *);
  109.  
  110.